<?php 
require_once(dirname(__FILE__)."/../libs/login/login.php");
$lg=new login();
$userid=$lg->getsession("admin_member","userid");
$menuid=trim($_GET['menu']);
if(empty($menuid)&&$menuid==''){$menuid=1;}

/*导航菜单*/
$menuArr=array(
	'1'=>array(
		'0'=>'网站管理',
		'1'=>array('left.php?p=10','main.php','后台首页',116), //最后为菜单权限代码
		'2'=>array('left.php?p=1','product/product_list.php','产品管理',117), 
		'3'=>array('left.php?p=2','article/article_list.php','文章管理',118),
		'4'=>array('left.php?p=7','meseage/meseage_list.php?isshow=1','留言管理',119),
		'5'=>array('left.php?p=3','manage/webmessage.php','网站设置',120),
		'6'=>array('left.php?p=8','manage/contact_info.php','联系信息',121),
		'7'=>array('left.php?p=9','manage/img_content.php?type=indeximg','广告管理',122),
		'8'=>array('left.php?p=11','manage/link_content.php','友情链接',127),
		'9'=>array('left.php?p=4','member/member_list.php','用户管理',123),
		
	),
	'2'=>array(
		'0'=>'空间管理',
		'1'=>array('left.php?p=6','manage/backup.php','空间管理',125),
		
	),	
	
	'3'=>array(
		'0'=>'用户权限',
		'1'=>array('left.php?p=5','power/powercontent_class.php','权限管理',115),
		
		
	),	
	
);

$qx_menu=$_SESSION["admin_member"]["caidan"];//权限菜单
$qx_menu_arr=explode(',',$qx_menu);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css">
A:link {
	COLOR: #000000; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A:visited {
	COLOR: #000000; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A:active {
	COLOR: #ff3333; FONT-SIZE: 9pt; TEXT-DECORATION: underline
}
A:hover {
	COLOR: #ff0000; FONT-SIZE: 9pt; TEXT-DECORATION: underline
}

A.blue:link {
	COLOR: #0000FF; FONT-SIZE: 9pt; TEXT-DECORATION: underline
}
A.blue:visited {
	COLOR: #0000FF; FONT-SIZE: 9pt; TEXT-DECORATION: underline
}
A.blue:hover {
	COLOR: #FF0000; FONT-SIZE: 9pt; TEXT-DECORATION: underline
}

A.tz:link {
	COLOR: #0000FF; font-size:14px; TEXT-DECORATION: underline
}
A.tz:visited {
	COLOR: #0000FF; font-size:14px; TEXT-DECORATION: underline
}
A.tz:hover {
	COLOR: #FF0000; font-size:14px; TEXT-DECORATION: underline
}

A.logout:link {
	COLOR: #E0E0E0; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A.logout:visited {
	COLOR: #E0E0E0; FONT-SIZE: 9pt; TEXT-DECORATION: none
}
A.logout:hover {
	COLOR: #ff8903; FONT-SIZE: 9pt; TEXT-DECORATION: none
}

BODY {
	COLOR: #000000; FONT-FAMILY:  "Arial", "微软雅黑", 'Times New Roman'; FONT-SIZE: 9pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none
}

TD {
	COLOR: #000000; FONT-FAMILY: "Arial", "微软雅黑", 'Times New Roman'; FONT-SIZE: 9pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none
}

UL {
	COLOR: #000000; FONT-FAMILY: "Arial", "微软雅黑", 'Times New Roman'; FONT-SIZE: 9pt; LINE-HEIGHT: 150%; TEXT-DECORATION: none
}
LI {
	COLOR: #000000; FONT-FAMILY:  "Arial", "微软雅黑",'Times New Roman'; FONT-SIZE: 9pt; LINE-HEIGHT: 200%; TEXT-DECORATION: none
}

/*** ESSENTIAL STYLES ***/

.sf-menu, .sf-menu * {
	margin:			0;
	padding:		0;
	list-style:		none;
	z-index:10;
}
.sf-menu {
	line-height:	1.0;
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){
.sf-menu {
	line-height:30px;
	height:16px;
	padding-top:2px;

}
	}
.sf-menu ul {
	position:		absolute;
	top:			-999em;
	width:			13.6em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
	width:			100%;
}
.sf-menu li:hover {
	visibility:		inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
	float:			left;
	position:		relative;
}
.sf-menu a {
	/*display:		block;
	position:		relative;	benson*/
}
.sf-menu li:hover ul,
.sf-menu li.sfHover ul {
	left:			10px;
	top:			2.2em; /* match top ul list item height */
	z-index:		99;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
	left:			13.4em; /* match ul width */
	top:			0;
	z-index:		99;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
	left:			10em; 
	top:			0;
}

.sf-menu {
	float:			left;
	margin-bottom:	1em;
}
.sf-menu a {
	padding: 		0em 0.7em 0em 1em;
	text-decoration:none;
	FONT-SIZE: 9pt
}
.sf-menu a{ 
	color:#000000;
}

.sf-menu li li {
	background:		#F1F1F1; 
}


.sf-menu li li li {
	background:		#F1F1F1;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
	outline:		0;
	text-decoration:none;
}

/*** arrows **/
.sf-menu a.sf-with-ul {
	padding-right: 	1em;
	min-width:		1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
	position:		absolute;
	display:		block;
	right:			.75em;
	top:			0.7em; /* IE6 only */
	width:			9px;
	height:			9px;
	text-indent: 	-999em;
	overflow:		hidden;
	background-image:url('images/menu_arrow.gif'); /*箭头*/
}
a > .sf-sub-indicator {  /* give all except IE6 the correct values */
	top:			.8em;
	background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
	background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

/* point right for anchors in subs */
.sf-menu ul .sf-sub-indicator { background-position:  -10px 0; }
.sf-menu ul a > .sf-sub-indicator { background-position:  0 0; }
/* apply hovers to modern browsers */
.sf-menu ul a:focus > .sf-sub-indicator,
.sf-menu ul a:hover > .sf-sub-indicator,
.sf-menu ul a:active > .sf-sub-indicator,
.sf-menu ul li:hover > a > .sf-sub-indicator,
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
	background-position: -10px 0; /* arrow hovers for modern browsers*/
}
.llllllll{
	position:		absolute;
	display:		block;
	right:			-0.8em;
	top:			-0.1em; /* IE6 only */
	width:			9px;
	height:			9px;
	color:#FFF;
	
}
.sf-menu a.current{ color:#ff8903}
.sf-menu a:hover{ color:#ff8903}
.sf-menu a{color:#ffffff}
.t-menu{text-align:center;float:left;padding:2px 10px 2px;margin-left:5px;color:#333333;background-image: url("images/btn01.jpg");font-size:13px;}
.t-menu a.active{ color:#ff8903}
.t-menu a:hover{ color:#ff8903}

</style>
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
<script>
	//时钟效果
	function changeClock(){
		var d = new Date();
		document.getElementById("clock").innerHTML = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
	}
		window.setInterval(changeClock, 1000);
</script>
<script language="javascript">
$(document).ready(function()    //导航
   {  
	 $("li > a").click(function(){
			$(this).addClass("current");
			$(this).parent().siblings().children().removeClass("current");			
		});	
		
	});  
	
	
	function JumpFrame(url1, url2, url3){	  //跳转			
		$("#leftmenu",parent.document.body).get(0).src = url1;
		$("#mainmenu",parent.document.body).get(0).src = url2;
		if(url3!=''){
			$("#topmenu",parent.document.body).get(0).src = url3;
		}
	}

</script>

</head>
<body style="background:#fff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/title_top_bg.jpg">
      <tr>
        <td height="29" style="color:#E0E0E0">
            <div style="float:left;padding-left:15px"><bdo id="clock"></bdo> &nbsp;<?php echo $userid;?>&nbsp; &nbsp;[&nbsp; <b><a href="loginout.php" class="logout">退出</A></b> &nbsp;]</div>
            <div style="float:right;padding-right:10px">
                <a href="/" class="logout" target="_blank">网站主页</a> &nbsp; &nbsp; &nbsp; 
                <a href="main.php" class="logout" target="right">查看统计</a> &nbsp; &nbsp; &nbsp; 
            </div>
        </td>
        
      </tr>
      <tr>
        <td height="1" colspan="2" bgcolor="#A9D2D8" background="images/dot_title_top.gif"><img src="images/dot_title_top.gif" width="1" height="1"></td>
      </tr>
    </table>
    
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td width="280" height="69" background="images/title_bg.gif"><img src="images/title-member.gif" width="280" height="63"></td>
        <td align="right" valign="top" background="images/title_bg.gif">
            <div id="myHeadMenuList" style="float:right;padding:15px 20px 0px 0px">
           	 <?php foreach($menuArr as $k=>$v){ 
			 		 if(in_array($k,$qx_menu_arr)){  //权限菜单判断
				?>
                <div class="t-menu">
                     <a href='#'  onClick="JumpFrame('<?php echo $v[1][0]?>','<?php echo $v[1][1]?>','top.php?menu=<?php echo $k?>')" class="<?php echo $menuid==$k?'active':''?>">&gt; <?php echo $v[0]?></a>
                </div>
             <?php }}?>    
            </div>
        </td>
      </tr>
    </table>
    <!--导航-->
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td background="images/title_bg2.gif" height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
                <ul id="sample-menu-1" class="sf-menu">
                 <?php foreach($menuArr[$menuid] as $key=>$val){
						if($key>=1 && in_array($val[3],$qx_menu_arr)){
						
				 ?>
                    <li class="level1" ><a href="#" onClick="JumpFrame('<?php echo $val[0]?>','<?php echo $val[1]?>','')" class="<?php echo $key=='1'?'current':''?>" ><b><?php echo $val[2]?></b><span class="llllllll"><?php echo $key!=strval(count($menuArr[$menuid])-1)?'|':''?></span></a></li>               
                 <?php 
				 	}
				 }?>
                 </ul>
             </td>      
          </tr>
        </table></td>
      </tr>
    </table>
</body>
</html>